﻿using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Collections.Generic;

namespace Subattle
{
	public partial class Torpedo : UserControl
	{
        public Vector2 Velocity { get; set; }
        public Vector2 Position { get; set; }
        public Submarine Owner { get; set; }
        public byte ID { get; set; }
		public Torpedo()
		{
			// Required to initialize variables
			InitializeComponent();
		}

        public void Update(TimeSpan elapsedTime)
        {
            Position += Velocity * (float)elapsedTime.TotalSeconds * 100f;

            Canvas.SetLeft(this, Position.X);
            Canvas.SetTop(this, Position.Y);
            
        }



	}
}